package com.swing.sky.web.generator.domain;

import java.util.List;

/**
 * 揽括所有配置的核心(包括一个表和它所有的生成文件集合）
 *
 * @author swing
 */
public class ModuleHouse {
    /**
     * 表对象
     */
    private Table table;

    /**
     * 该表的列集合
     */
    private List<GenColumn> columns;

    /**
     * 该表需要生成的文件模块集合
     */
    private List<Module> modules;

    /**
     * 左边的邻居名
     */
    private String leftHouseName;
    /**
     * 右边的邻居名
     */
    private String rightHouseName;

    public Table getTable() {
        return table;
    }

    public void setTable(Table table) {
        this.table = table;
    }

    public List<Module> getModules() {
        return modules;
    }

    public void setModules(List<Module> modules) {
        this.modules = modules;
    }

    public String getLeftHouseName() {
        return leftHouseName;
    }

    public void setLeftHouseName(String leftHouseName) {
        this.leftHouseName = leftHouseName;
    }

    public String getRightHouseName() {
        return rightHouseName;
    }

    public void setRightHouseName(String rightHouseName) {
        this.rightHouseName = rightHouseName;
    }

    public List<GenColumn> getColumns() {
        return columns;
    }

    public void setColumns(List<GenColumn> columns) {
        this.columns = columns;
    }

    /**
     * 获取房主的名字（表名）
     */
    public String getHoseName() {
        return table.getTableName();
    }

    @Override
    public String toString() {
        return "ModuleHouse{" +
                "table=" + table +
                ", columns=" + columns +
                ", modules=" + modules +
                ", leftHouseName='" + leftHouseName + '\'' +
                ", rightHouseName='" + rightHouseName + '\'' +
                '}';
    }

}
